import Vue from 'vue'
import Router from 'vue-router'
import Index from '../components/Index'
import Person from '../components/PersonInfo'
import DeviceInfo from '../components/DeviceInfo'
import Login from '../components/login/Login'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login,
      hidden: true,
    },
    //人员信息
    {
      path: '/home',
      name: '人员管理',
      component: Index,
      children: [
        {
          path: '/personInfo',
          name: '人员信息',
          component: Person
        },
      ]
    },
    // 设备信息
    {
      path: '/home',
      name: '设备信息',
      component: Index,
      children: [

        {
          path: '/deviceInfo',
          name: '设备信息',
          component: DeviceInfo
        },
      ]
    }
  ]
})
